
all: clean build run

tidy:
	@echo "Tidying up"
	@go mod tidy

CreateBuildDate:
	@echo "Creating build date" 
	@$(shell sbin/create_build_date.sh) 

clean_probe:
	@echo "Cleaning up probe"
	@rm -f bin/prober
	@rm -rf /mnt/d/report_hshe_20240228.xlsx

clean: clean_probe

build_probe: CreateBuildDate tidy
	@echo "Building probe"
	@CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o bin/prober cmd/prober/main.go

build: build_probe

run_probe:
	@echo "Running probe"
	@bin/prober
	@cp bin/result/report_hshe_20240228.xlsx /mnt/d/

run: run_probe

upx:
	@echo "Compressing"
	@upx -9 bin/prober

release: build upx
	@echo "Releasing" 

